﻿using RpcExtend.Service.Interface;
using RpcModel;
using RpcModularModel.Identity;
using RpcModularModel.Identity.Model;
using RpcModularModel.Identity.Msg;

namespace RpcExtend.Service.Event
{
    /// <summary>
    /// 身份标识
    /// </summary>
    internal class IdentityEvent : RpcClient.Interface.IRpcApiService
    {
        private IIdentityService _Service;

        public IdentityEvent(IIdentityService service)
        {
            this._Service = service;
        }
        public void RefreshIdentityPrower(RefreshIdentityPrower refresh)
        {
            this._Service.RefreshPrower(refresh);
        }
        public void RefreshIdentity(RefreshIdentity refresh)
        {
            this._Service.Refresh(refresh);
        }
        /// <summary>
        /// 获取身份标识
        /// </summary>
        /// <param name="obj">参数</param>
        /// <param name="source">事件原</param>
        /// <returns>身份标识</returns>
        public IdentityDatum GetIdentity(GetIdentity obj, MsgSource source)
        {
            return this._Service.GetIdentity(obj.IdentityId, source);
        }
    }
}
